#include <iostream>
using namespace std;

const int buf = 512;
int N(5);//数组的长度
char buffer[buf];//在静态区
void new_advance()
{
	double *p1, *p2;
	p1 = new double[N];
	p2 = new (buffer)double[N]; //在指定区域分配内存
	for (int i = 0; i < N; i++)
	{
		p1[i] = p2[i] = i + 23.3;
		std::cout <<&p1[i] <<"->"<< p1[i]<<"\t";
		std::cout <<&p2[i]<<"->"<< p2[i] << endl;
	}
	delete p1;
}
void main4()
{
	new_advance();
	system("pause");
}